$new
( type in module ng
)
Creates a new child scope
.
The parent scope will propagate the $digest()
and
$digest()
events. The scope can be removed from the scope
hierarchy using $destroy()
.
$destroy()
must be called on a scope when it is desired for
the scope and its child scopes to be permanently detached from the parent and thus stop
participating in model change detection and listener notification by invoking.
Scope#$new(isolate);
isolate – {boolean} –
if true then the scope does not prototypically inherit from the parent scope. The scope is isolated, as it can not see parent scope properties. When creating widgets it is useful for the widget to not accidentally read parent state.
{Object}
– The newly created child scope.